<template>
	<view v-if="hasLogin" class="main">
		<u-subsection :list="Menulist" :current="current" mode="subsection" fontSize="14"
			@change="changeCur"></u-subsection>
		<view class="list">
			<Lylist my="1" ref="forceRefresh"></Lylist>
		</view>
	</view>
</template>

<script>
	import Lylist from '@/uni_modules/Lylist/Lylist.vue';
	import {
		mapState,
		mapMutations
	} from 'vuex'
	import {
		dowxLogin
	} from '@/api/api.js';
	export default {
		components: {
			Lylist,

		},
		computed: {
			...mapState(['hasLogin', 'userInfo']),
		},
		data() {
			return {
				Menulist: ["待处理", "待审核", "已办结"],
				current: 0,
			}
		},
		onReachBottom() {
			this.$refs.forceRefresh.getPage(this.current)
		},
		onLoad() {
			// this.forceRefresh = false
			if (!this.hasLogin) {
				uni.navigateTo({
					url: '/pages/user/login'
				})
			}
		},
		methods: {
			...mapMutations(['userLogin', 'logout']),
			changeCur(e) {
				this.current = e
				this.$refs.forceRefresh.Refresh(e)
			}

		},
	}
</script>

<style lang="scss" scoped>
	.main {
		margin: 30rpx;
	}
</style>